package app.fugema.shop.main.goods.adapter;

import com.base.common.view.adapter.ada.SingleRecyclerAdapter;
import com.base.common.view.adapter.connector.BaseViewHolder;

import app.fugema.shop.R;
import app.fugema.shop.databinding.ItemSimpleCouponTagViewBinding;
import app.fugema.shop.main.goods.model.SimpleShopCouponBean;

public class SimpleCouponAdapter extends SingleRecyclerAdapter<SimpleShopCouponBean, ItemSimpleCouponTagViewBinding>
{
    @Override
    public int getLayoutId()
    {
        return R.layout.item_simple_coupon_tag_view;
    }

    @Override
    public void onBindViewHolder(ItemSimpleCouponTagViewBinding binding, int position, BaseViewHolder viewHolder, SimpleShopCouponBean bean)
    {
        super.onBindViewHolder(binding, position, viewHolder, bean);
        int price = (int)Double.parseDouble( bean.getPrice() );
        binding.tvCouponDesc.setText(price +"元优惠券");
    }
}
